import request from "@/utils/request-unimall";
import Qs from "qs";

export function listCoupon(query) {
  return request({
    method: 'get',
    url: "/web/admin-coupon/list",
    params: {
      ...query
    }
  })
}
export function createCoupon(data) {


  return request({
    method: "post",
    url: "/web/admin-coupon/create",
    data
  });
}

export function updateCoupon(data) {
  return request({
    method: "post",
    url: "/web/admin-coupon/edit",
    data
  });
}

export function activeCoupon(data) {
  return request({
    method: 'get',
    url: "/web/admin-coupon/update-status",
    params: {
      ...data
    }
  })
}

export function deleteCoupon(data) {
  return request({
    method: 'get',
    url: "/web/admin-coupon/delete",
    params: {
      ...data
    }
  })
}

